import axios from './axios'


// 获取旋挖设备信息列表
export function getRotaryList(params) {
    const url = '/ms/api/rotary/list'
    return axios.get(url, params)
}
//修改旋挖设备
export function getRotaryEdit(params) {
    const url = '/ms/api/rotary/edit'
    return axios.post(url, params)
}
//旋挖设备详情信息
export function getRotaryDetail(params) {
    const url = '/ms/api/rotary/detail'
    return axios.get(url, params)
}
//添加旋挖设备
export function getRotaryAdd(params) {
    const url = '/ms/api/rotary/add'
    return axios.post(url, params)
}
//上传图片接口
export function getRotaryUploadImg(params) {
    const url = '/ms/api/rotary/uploadImg'
    return axios.get(url, params)
}
//旋挖设备进场
export function getRotaryEnter(params) {
    const url = '/ms/api/rotary/enter/'
    return axios.get(url+params)
}
//旋挖设备退场
export function getRotaryOuter(params) {
    const url = '/ms/api/rotary/outer/'
    return axios.get(url+params)
}
//旋挖设备绑定硬件
export function getRotaryBind(params) {
    const url = '/ms/api/rotary/bind'
    return axios.post(url,params)
}
//旋挖设备解绑
export function getRotaryUnBind(params) {
    const url = '/ms/api/rotary/unbind/'
    return axios.get(url+params)
}
//删除旋挖机设备
export function getRotaryDel(params) {
    const url = '/ms/api/rotary/del/'
    return axios.get(url+params)
}
//查询操作手信息
export function getRotaryOperatorList(params) {
    const url = '/ms/api/rotary/operatorList'
    return axios.get(url,params)
}
//轨迹回放
// 旋挖设备列表
export function getRotaryDataList(params) {
    const url = '/ms/api/rotary/data/list'
    return axios.get(url, params)
}
//旋挖设备轨迹
export function getRotaryDataGps(params) {
    const url = '/ms/api/rotary/data/gps'
    return axios.get(url, params)
}
//设备保养
//查询旋挖设备保养列表
export function getRotaryMaintainList(params) {
    const url = '/ms/api/rotary/maintain/list'
    return axios.get(url, params)
}
//查询指定旋挖设备保养列表
export function getRotaryMaintainMachList(params) {
    const url = '/ms/api/rotary/maintain/getMachList'
    return axios.get(url, params)
}
//查询指定设备首次保养合格
export function getFirsQualified(params) {
    const url = '/ms/api/rotary/maintain/getFirsQualified'
    return axios.get(url, params)
}
//查询旋挖设备保养详情
export function getRotaryMaintainDesc(params) {
    const url = '/ms/api/rotary/maintain/detail'
    return axios.get(url, params)
}
//查询旋挖设备保养状态对应条数
export function getRotaryMaintainStateNum(params) {
    const url = '/ms/api/rotary/maintain/getStateNum'
    return axios.get(url, params)
}
//设备保养审核
export function getRotaryMaintainLog(params) {
    const url = '/ms/api/rotary/maintain/handle'
    return axios.post(url, params)
}

//报警设置
// 查询报警列表
export function getRotaryWarnList(params) {
    const url = '/ms/api/rotary/warn/list'
    return axios.get(url, params)
}
//添加报警设置
export function getRotaryWarnAdd(params) {
    const url = '/ms/api/rotary/warn/add'
    return axios.post(url, params)
}
//编辑报警设置
export function getRotaryWarnEdit(params) {
    const url = '/ms/api/rotary/warn/edit'
    return axios.post(url, params)
}

//设置报警时间
export function getRotaryWarnSetTime(params) {
    const url = '/ms/api/rotary/warn/setTime'
    return axios.post(url, params)
}
//设置接收报警的用户及接收方式
export function getRotaryWarnAddUser(params) {
    const url = '/ms/api/rotary/warn/addUser'
    return axios.post(url, params)
}


//报警对象列表
export function getRotaryWarnMachList(params) {
    const url = '/ms/api/rotary/warn/machList'
    return axios.get(url, params)
}
//添加报警设备
export function getRotaryWarnAddMach(params) {
    const url = '/ms/api/rotary/warn/addMach'
    return axios.post(url, params)
}
//查询可添加的设备
export function getRotaryWarnGetMachList(params) {
    const url = '/ms/api/rotary/warn/getMachList'
    return axios.get(url, params)
}



//查询接收报警的用户及接收方式
export function getRotaryWarnUserList(params) {
    const url = '/ms/api/rotary/warn/userList'
    return axios.get(url, params)
}
//查询可添加的设备
export function getRotaryWarnAddMachList(params) {
    const url = '/ms/api/rotary/warn/addMachList'
    return axios.get(url, params)
}
//删除报警设置
export function getRotaryWarnDel(params) {
    const url = '/ms/api/rotary/warn/del/'
    return axios.post(url+params)
}
//启用禁用设备报警
export function getRotaryWarnEnable(params) {
    const url = '/ms/api/rotary/warn/enable'
    return axios.post(url, params)
}

//报警记录
//设备报警记录列表
export function getRotaryWarnRecordList(params) {
    const url = '/ms/api/rotary/warn/record/list'
    return axios.get(url, params)
}
//查看报警处理详情
export function getRotaryWarnRecordDetails(params) {
    const url = '/ms/api/rotary/warn/record/detail'
    return axios.get(url, params)
}
//处理报警
export function getRotaryWarnRecordHandle(params) {
    const url = '/ms/api/rotary/warn/record/handle'
    return axios.post(url, params)
}

//获取设备违规列表
export function getRotaryViolationMachList(params) {
    const url = '/ms/api/rotary/violation/listByMachId'
    return axios.get(url, params)
}
//根据设备id获取违规数
export function getNumByMachId(params) {
    const url = '/ms/api/rotary/violation/getNumByMachId'
    return axios.get(url, params)
}
//获取违规数
export function getRotaryViolationNum(params) {
    const url = '/ms/api/rotary/violation/getNum'
    return axios.get(url, params)
}
//违规行为分析
export function getRotaryViolationStatistics(params) {
    const url = '/ms/api/rotary/violation/statistics'
    return axios.get(url, params)
}
//获取人员违规列表
export function getRotaryViolationlistByPersonId(params) {
    const url = '/ms/api/rotary/violation/listByPersonId'
    return axios.get(url, params)
}
//首页设备在线，离线数量
export function getRotaryNum(params) {
    const url = '/ms/api/rotary/index/getMachNum'
    return axios.get(url, params)
}
//首页设备列表(不分页)
export function getRotaryIndexList(params) {
    const url = '/ms/api/rotary/index/list'
    return axios.get(url, params)
}
//视频回放
export function getRotaryPlayBack(params) {
    const url = '/ms/api/rotary/playback'
    return axios.get(url, params)
}


// 人员信息
//人员信息添加
export function getRotaryEmpAdd(params) {
    const url = '/ms/api/rotary/emp/add'
    return axios.post(url, params)
}
//人员信息编辑
export function getRotaryEmpEdit(params) {
    const url = '/ms/api/rotary/emp/edit'
    return axios.post(url, params)
}
//人员信息设备绑定
export function getRotaryEmpBind(params) {
    const url = '/ms/api/rotary/emp/bind'
    return axios.post(url, params)
}
//人员信息设备解绑
export function getRotaryEmpUnBind(params) {
    const url = '/ms/api/rotary/emp/unbind/'
    return axios.get(url+ params)
}
//人员信息设备解绑
export function getRotaryEmpDel(params) {
    const url = '/ms/api/rotary/emp/del/'
    return axios.get(url+ params)
}
//人员信息入职
export function getRotaryEmpEnter(params) {
    const url = '/ms/api/rotary/emp/enter/'
    return axios.get(url+ params)
}

//人员信息离职
export function getRotaryEmpOuter(params) {
    const url = '/ms/api/rotary/emp/outer/'
    return axios.get(url+ params)
}
//人员信息列表
export function getRotaryEmpList(params) {
    const url = '/ms/api/rotary/emp/list'
    return axios.get(url, params)
}
//人员信息详情
export function getRotaryEmpDetail(params) {
    const url = '/ms/api/rotary/emp/detail'
    return axios.get(url, params)
}

//批量处理报警记录
export function disposebatchHandle(params) {
    const url = '/ms/api/rotary/warn/record/batchHandle'
    return axios.post(url, params)
}
